#pragma once

#include <MOE/Core/ClassMeta.h>

#include "TokenClassMetaManager.h"
#include "TypeToken.hpp"

namespace MOE
{
	namespace System
	{
		namespace NonIntrusive
		{
			// Gets the class meta from the singleton TokenClassMetaManager, after it's been initialized through TypeInitializer<T>
			template <class T>
			const Core::ClassMeta& ClassMeta()
			{
				TokenClassMetaManager* pInstance = TokenClassMetaManager::GetInstance();
				if (pInstance != nullptr)
				{
					return pInstance->GetClassMeta(TypeToken<T>::Value());
				}
				else
				{
					return Core::ClassMeta::kNil;
				}
			}
		}
	}
}
